<template>
  <Card>
    <Row type="flex"
         class="margin-b-20">
      <div style="margin-right: 10px">
        <Button type="primary"
                icon="md-add"
                @click="addSellModel = true">会员签到</Button>
      </div>
      <div>
        <Button type="info"
                icon="md-add"
                @click="visitorModel = true">来访签到</Button>
      </div>
    </Row>
    <Table border
           :columns="columns1"
           :data="data1"></Table>

    <!--会员签到-->
    <Modal v-model="addSellModel"
           title="会员签到"
           :loading="loading"
           :mask-closable="false"
           @on-ok="onSellSubmit"
           @on-visible-change="onSellVisible">
      <member></member>
    </Modal>
    <Modal v-model="visitorModel"
           title="来访签到"
           :loading="loading"
           :mask-closable="false"
           @on-ok="onSellSubmit"
           @on-visible-change="onSellVisible">
      <visitor></visitor>
    </Modal>
  </Card>
</template>

<script>
import visitor from './components/visitor'
import member from './components/member'

export default {
  components: {
    visitor,
    member
  },
  name: 'list',
  data () {
    return {
      columns1: [
        {
          title: '姓名',
          key: 'name'
        },
        {
          title: '课程',
          key: 'course'
        },
        {
          title: '老师',
          key: 'teacher'
        },
        {
          title: '消费(￥/次)',
          key: 'consume'
        },
        {
          title: '操作员',
          key: 'operator'
        },
        {
          title: '时间',
          key: 'time'
        }
      ],
      data1: [
        {
          name: '小红',
          course: '瑜伽',
          teacher: 'John Brown',
          consume: '100',
          operator: '店员一号',
          time: '2019-12-12'
        }
      ],
      courseList: [ // 课程
        {
          value: '课程二',
          label: '课程一'
        },
        {
          value: '课程二',
          label: '课程二'
        }
      ],
      courseModel: '',
      teacherList: [ // 老师
        {
          value: '老师一',
          label: '老师一'
        },
        {
          value: '老师二',
          label: '老师一'
        }
      ],
      teacherModel: '',
      addSellModel: false,
      visitorModel: false,
      select2: '次'
    }
  },
  mounted () {

  },
  methods: {}
}
</script>

<style scoped>
.rules {
  font-size: 14px;
  margin: 20px;
}
</style>
